import apiBinderFactory from '~/utils/apiBinderFactory';

const prefix = 'email';

async function send({ email }) {
  return await this.$axios.$post(`/${prefix}/send`, {
    email
  });
}

async function verify({ email, code }) {
  return await this.$axios.$post(`/${prefix}/verify`, {
    email,
    code
  });
}

export default apiBinderFactory({
  send,
  verify
});
